[#ftl]
[#--include "../../util.ftl"/--]
	
 [@define "agile.form.ValidationTextBox" "agile.form.TextBox"]
	category:"ValidationTextBox Component"
	,widgetName:"ValidationTextBox"

	,attributes:agile.delegate(agile.form.TextBox.prototype.attributes,{			
		"required":lang.mixin({},agile.BooleanMetadata,{label:"i18n_required"})
		,"promptMessage":lang.mixin({},agile.TextMetadata,{label:"i18n_prompt_message"})
		,"invalidMessage":lang.mixin({},agile.TextMetadata,{label:"i18n_invalid_message"})
		,"pattern":lang.mixin({},agile.TextMetadata,{label:"i18n_pattern"})
	})
	,_extractDefaultParameterValueOverride:function(prototype){
		 this.messages = i18n.getLocalization("dijit.form", "validate", this.lang);		 
		 prototype.attributes["promptMessage"]["defaultValue"] = this.messages.promptMessage;
		 prototype.attributes["invalidMessage"]["defaultValue"] = this.messages.invalidMessage;
	}
	,initDefaultMetadata:function(){
//		 this.metadata("parameters.value",null);			 
		 this.metadata("parameters.required",false);
		// this.metadata("parameters.pattern",".*");		 
	}
 	,_getDelegatePrototype:function(){
 		agile.requireX("dijit/form/ValidationTextBox");
// 		this.metadata("dojoDeclaredClass","dijit/form/ValidationTextBox");
		return dijit.form.ValidationTextBox.prototype;
	}
//	 ,constructor: function(){	
//		 
//		 agile.requireX("dijit/form/ValidationTextBox");
//	 }
//		,startup:function(){			
//			this.delegate.startup();
//			on(this.delegate,"onChange",this,function(newValue){
//				topic.publish("agile.widget.changed",[this.category,"value",newValue]);					
//				this.metadata("value",newValue);				
//			});	
//		}		
[/@]
